<?xml version="1.0" encoding="UTF-8"?>
<!--
  Created by IntelliJ IDEA.
  User: azim
  Date: 5/20/13
  Time: 11:56 AM
-->

<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="templates/template.xhtml">

    <ui:define name="title">User Registration Page</ui:define>

    <ui:define name="cbody">

        <h2>Please fill up the following form for registration : </h2>
        <br/>
        <h:form id="login_form">

            <h:panelGrid columns="3" cellspacing="10" style="margin-bottom: 5px">

                <p:outputLabel styleClass="label" for="username" value="Username : "/>
                <p:inputText id="username"
                             value="#{loginController.user.username}"
                             required="true"
                             requiredMessage="Error : Username is required"/>
                <p:message for="username" styleClass="error"/>

                <p:outputLabel styleClass="label" for="password" value="Password : "/>
                <p:password id="password"
                            value="#{loginController.user.password}"
                            required="true"
                            requiredMessage="Error : Password is required"/>
                <p:message for="password" styleClass="error"/>

            </h:panelGrid>

            <p:commandButton value="Login" action="#{loginController.login}" ajax="false"/>

        </h:form>

        <p:messages globalOnly="true"/>

    </ui:define>
</ui:composition>

</html>